import request from "@/util/request";

// 获取推荐
export const getrecommend = current => request({
  url: '/qichong-record/api/community/feed',
  params: current
});

// 获取文章
export const getarticle = current => request({
  url: '/qichong-record/api/community/hot',
  params: current
});


// 关注
export const getattention = (followed) => request({
  url: '/qichong-record/api/behavior/following',
  method: 'post',
  data: {
    associatedId: followed,
    associatedType: 0
  }
});

// 删除动态文章
export const removeattention = (ids) => request({
  url: '/qichong-record/api/article/remove',
  method: 'post',
  params: {
    ids
  }
});

// 点赞
export const getLikeed = (likes) => request({
  url: '/qichong-record/api/behavior/like',
  method: 'post',
  data: likes
});

// 获取圈子
export const getcircleList = (shopId) => request({
  url: '/qichong-record/api/community/category',
  params: {
    shopId
  }
});

// 获取圈子下面的精华
export const getcircleessence = (current) => request({
  url: '/qichong-record/api/article/pageByCategory',
  params: current

});

// 我想买产品接口
export const behaviorBuying = (productId, buyingType) => request({
  url: '/qichong-record/api/behavior/buying',
  method: 'post',
  data: {
    buyingType,
    productId
  }
});

// 获取关注列表
export const getattentionList = () => request({
  url: '/qichong-record/api/community/followed'
});

// 获取关注列表动态文章
export const getattentionrecommend = (current) => request({
  url: '/qichong-record/api/community/followedPage',
  params: current
});

// 获取粉丝列表
export const getfansList = () => request({
  url: '/qichong-record/api/community/follower'
});

// 获取圈子粉丝列表
export const getcirclepersonList = (queryType) => request({
  url: '/qichong-record/api/behavior/joiners',
  params: queryType
});

// 我想加入接口
export const behaviorJoiner = (associatedId, associatedType) => request({
  url: '/qichong-record/api/behavior/join',
  method: 'post',
  data: {
    associatedId,
    associatedType
  }
});
